import { getPages,get,put,post } from '../utils/request';
import * as selectSrcService from './selectSrcService';
///获取数据列表
export async function getList(input) {
    return getPages(`/app/Executor/GetPagedListDealers`, input.currentPage, input.pageSize, input.queryStr);
}

export async function create(input) {
    return post('/app/Executor/Create', { body: JSON.stringify(input) });
}

export async function update(input) {
    return put('/app/Executor/Update', { body: JSON.stringify(input) });
}

export async function getItem(id) {
    return get(`/app/Executor/Get?id=${id}`);
}

///初始化单位管理相关配置
export async function initConfig(input) {
    if (selectSrcService.ExecTypes.length < 1) {
      selectSrcService.getExecTypes({ pId: 'E', qryStr: '', topNum: 0 });
    }
    return [];
  }
